const http = uni.$u.http

// post请求，获取菜单
export const postMenu = (params, config = {}) => http.post('/ebapi/public_api/index', params, config)

// get请求，获取菜单
export const getMenu = (params, config = {}) => http.get('/ebapi/public_api/index', params, config)

/**
 * 使用示例：
 *
 * import { postMenu, getMenu } from '@/api/demo.js';
 *
 *
 *
 * // 发出post请求
 * postMenu({ name: 'test' }).then(res => {
 *   // 处理响应
 * }).catch(err => {
 *   // 处理错误
 * })
 *
 *
 *
 *
 * // 不需要toast和catch的情况
 * postMenu(
 *   { name: 'test' },
 *   {
 *     custom: {
 *       toast: false,
 *       catch: false
 *     }
 *   }
 * ).then(res => {
 *   // 处理响应
 * })
 */
